<template>
    <div>
        <el-input
            placeholder="请选择搜索类型"
            v-model="value"
            class="input-with-select"
        >
            <el-select v-model="type" slot="prepend" placeholder="请选择">
                <el-option label="姓名" value="name"></el-option>
                <el-option label="性别" value="gender"></el-option>
                <el-option label="年龄" value="age"></el-option>
            </el-select>
            <el-button slot="append" icon="el-icon-search" @click="handleClick"></el-button>
        </el-input>
    </div>
</template>

<script>
export default {
  props:['type','value'],
    data() {
    },
    methods: {
        handleClick() {
            console.log("click");
            this.$emit("show", { type: this.type, value: this.value });
        },
    },
};
</script>

<style>
</style>